/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.util.Map;

/**
 *
 * @author Администратор
 */
public class DAOFactory {
  
//  private static CrumbsUserDAO userDAO = null;
//  private static Factory instance = null;

  Map<Class, DAO>  daos;
  
  
  /*public static synchronized Factory getInstance(){
    if (instance == null){
      instance = new Factory();
    }
    return instance;
  }*/

  public DAO getCrumbsUserDAO(){
    return daos.get(CrumbsUserDAO.class);
  }
  
  
  
  public void setDaos(Map<Class, DAO> daos){
      this.daos = daos;
  }
  /*
   * CrumbsUserDAO userDAO;

public void setUserDAO(UserDAO userDAO  ){
   this.userDAO = userDAO;
}

public DAO getDAO(){
    return userDAO;
  }
  * 
 <utils:map key="java.lang.Class" valu="dao.DAO">
 * <entry key="dao.CrumbsUserDAO" value-ref="crumbsUserDAO"/>
 </utils:map>
 * 
 * 
 * <bean id="crumbsUserDAO" class="dao.crumbsUserDAOImpl/>
   
 <bean id="daoFactory" class="...">
   <property name="userDAO" ref="bean CrumbsUserDAO"/>
</bean>
   */
}
